<div id="content">
  <div id="user-tb">
    <div id="title">
      <h1>个人资料</h1>
      <p class="tips">这里的资料是线上与线下身份的真实对接，<a href="/">返回首页</a></p>
    </div>
    <table border="0" cellspacing="5" cellpadding="5" style="font-size:0.8em">
      <tr>
        <td width="100" class="right">用户名</td>
        <td width="250"><%= h @user.login %></td>
      </tr>
      <% if @user.profile -%>
      <tr>
        <td class="right">真实姓名</td>
        <td><%= h @user.profile.last_name %>&nbsp;<%= h @user.profile.first_name %></td>
      </tr>
      <tr>
        <td class="right">性别</td>
        <td><%= image_tag "/images/male.png" if @user.profile.sex==1 %><%= image_tag "/images/female.png" if @user.profile.sex==2 %></td>
      </tr>
      <tr>
        <td class="right">所在学校</td>
        <td><%= h @user.profile.school_name %></td>
      </tr>
      <tr>
        <td class="right">年级</td>
        <td><%= h @user.profile.class_level %></td>
      </tr>
      <tr>
        <td class="right">专业</td>
        <td><%= h @user.profile.major %></td>
      </tr>
      <% end -%>
      <% if @user.delicious_url -%>
      <tr>
        <td class="right"><img src="/images/delicious.png" /></td>
        <td><%= link_to "我的 Delicio.us", h(@user.delicious_url) %></td>
      </tr>
      <% end -%>
      <% if @user.yupoo_url -%>
      <tr>
        <td class="right"><img src="/images/yupoo.png" /></td>
        <td><%= link_to "我的又拍", h(@user.yupoo_url) %></td>
      </tr>
      <% end -%>
      <% if @user.douban_url -%>
      <tr>
        <td class="right"><img src="/images/douban.png" /></td>
        <td><%= link_to "我的豆瓣", h(@user.douban_url) %></td>
      </tr>
      <% end -%>
      <% if @user.fanfou_url -%>
      <tr>
        <td class="right"><img src="/images/fanfou.png" /></td>
        <td><%= link_to "我的饭否", h(@user.fanfou_url) %></td>
      </tr>
      <% end -%>
      <% if @user.twitter_url -%>
      <tr>
        <td class="right"><img src="/images/twitter.png" /></td>
        <td><%= link_to "我的 twitter", h(@user.twitter_url) %></td>
      </tr>
      <% end -%>
    </table>
  </div>
</div>